﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace JNPF.Basics.Models.Extend.Dtos.Order
{
    /// <summary>
    /// 修改订单
    /// </summary>
    public class OrderUpInput
    {
        /// <summary>
        /// 客户名称
        /// </summary>
        [Required(ErrorMessage = "客户名称不能为空")]
        public string customerName { get; set; }
        /// <summary>
        /// 业务人员id
        /// </summary>
        [Required(ErrorMessage = "业务人员id不能为空")]
        public string salesmanId { get; set; }
        /// <summary>
        /// 订单日期
        /// </summary>
        [Required(ErrorMessage = "订单日期不能为空")]
        public DateTime? orderDate { get; set; }
        /// <summary>
        /// 订单编码
        /// </summary>
        [Required(ErrorMessage = "订单编码不能为空")]
        public string orderCode { get; set; }
        /// <summary>
        /// 付款方式
        /// </summary>
        [Required(ErrorMessage = "付款方式不能为空")]
        public string paymentMode { get; set; }
        /// <summary>
        /// 付款金额
        /// </summary>
        [Required(ErrorMessage = "付款金额不能为空")]
        public decimal? receivableMoney { get; set; }
        /// <summary>
        /// 定金比率
        /// </summary>
        [Required(ErrorMessage = "定金比率不能为空")]
        public decimal? earnestRate { get; set; }
        /// <summary>
        /// 预付定金
        /// </summary>
        [Required(ErrorMessage = "预付定金不能为空")]
        public decimal? prepayEarnest { get; set; }
        /// <summary>
        /// 运输方式	
        /// </summary>
        [Required(ErrorMessage = "运输方式不能为空")]
        public string transportMode { get; set; }
        /// <summary>
        /// 发货日期
        /// </summary>
        [Required(ErrorMessage = "发货日期不能为空")]
        public DateTime? deliveryDate { get; set; }
        /// <summary>
        /// 发货地址
        /// </summary>
        [Required(ErrorMessage = "发货地址不能为空")]
        public string deliveryAddress { get; set; }
        /// <summary>
        /// 相关附近
        /// </summary>
        [Required(ErrorMessage = "相关附近不能为空")]
        public string fileJson { get; set; }
        /// <summary>
        /// 客户ID
        /// </summary>
        [Required(ErrorMessage = "客户ID不能为空")]
        public string customerId { get; set; }
        /// <summary>
        /// 业务人员名字	
        /// </summary>
        [Required(ErrorMessage = "业务人员名字不能为空")]
        public string salesmanName { get; set; }
        /// <summary>
        ///备注
        /// </summary>
        [Required(ErrorMessage = "备注不能为空")]
        public string description { get; set; }

        public string id { get; set; }
        public string status { get; set; }
        public string freeApproverUserId { get; set; }
        /// <summary>
        /// 商品列表
        /// </summary>
        [Required(ErrorMessage = "商品列表不能为空")]
        public List<GoodsListUp> goodsList { get; set; }
        /// <summary>
        /// 收款计划列表
        /// </summary>
        [Required(ErrorMessage = "收款计划列表不能为空")]
        public List<CollectionPlanListUp> collectionPlanList { get; set; }
    }
    public class GoodsListUp : GoodsList
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [Required(ErrorMessage = "主键id不能为空")]
        public string id { get; set; }
        /// <summary>
        /// 商品id
        /// </summary>
        [Required(ErrorMessage = "商品id不能为空")]
        public string orderId { get; set; }
    }
    public class CollectionPlanListUp : CollectionPlanList
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [Required(ErrorMessage = "主键id不能为空")]
        public string id { get; set; }
        /// <summary>
        /// 商品id
        /// </summary>
        [Required(ErrorMessage = "商品id不能为空")]
        public string orderId { get; set; }
    }
}
